package com.gxuwz.stats.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxuwz.stats.entity.AcademicPapers;
import com.gxuwz.stats.entity.ScientificActivity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;

@Mapper
public interface AcademicPapersMapper extends BaseMapper<AcademicPapers> {

    @Insert("INSERT INTO rsp_achievement_paper" +
            "(user_id, paper_title, journal_info, paper_publish_date, paper_issn, paper_category,paper_score,paper_notes) " +
            "VALUES " +
            "(#{userId}, #{paperTitle}, #{journalInfo}, #{paperPublishDate}, #{paperIssn}, #{paperCategory}, #{paperScore}, #{paperNotes})")
    int insertWithUserId(AcademicPapers academicPapers);

    /**
     * 二级学院管理员-查询
     * @return
     */
    IPage<AcademicPapers> getTwoAdminAcaPapersList(
            @Param("page") IPage<AcademicPapers> page,
            @Param("department") String department,
            @Param("username") String username,
            @Param("paperTitle") String paperTitle,
            @Param("journalInfo") String journalInfo,
            @Param("paperCategory") String paperCategory,
            @Param("paperPublishDate") LocalDate paperPublishDate,
            @Param("paperIssn") String paperIssn);
}
